<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
        <script>
             /*
                前面是请求地址,后面是请求参数
                  https://api.search.mi.com/search?
                  callback=jsonpcallback
                  &query=%E6%99%BA%E8%83%BD%E5%AE%B6%E5%BA%AD
                  &page_index=1&page_size=20&filter_tag=0
                  &main_sort=0
                  &_=1583151403088 防止缓存的时间戳  
                  $ajax({
                      url:'https://api.search.mi.com/search',//地址直接复制粘贴
                      data:{
                        query:'智能家庭',
                        page_index=1,
                        page_size=20,
                        filter_tag=0,
                        main_sort=0,
                      }
                      dataType:'jsonp',//数据类型
                      success:function(res){
                          console.log(res);
                      }

                  }
            */
        </script>
</body>
</html>